Record: Per-Order Adaptive Alpha + N-gram Backoff (val_bpb=0.2995, 3-seed)#810
Open
Idan3011 wants to merge 4 commits intoopenai:mainfrom
Open
Record: Per-Order Adaptive Alpha + N-gram Backoff (val_bpb=0.2995, 3-seed)#810Idan3011 wants to merge 4 commits intoopenai:mainfrom
Idan3011 wants to merge 4 commits intoopenai:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two-Phase Shared N-gram Backoff + EMA-GPU + Pre-Enrichment + XSA
val_bpb: 0.2995 (3-seed mean, std 0.0016) | 14.94 MB | 8xH100 SXM, 600s
3-Seed Results
Progress
Key Contributions
Two-Phase N-gram Eval with Global Cache
Phase 1 (parallel, all GPUs): Each GPU processes its share of sliding windows. Computes model target
probabilities, entropy, and pre-enrichment delta.
Phase 2 (global, sequential): All scored data gathered via all_gather, sorted by position. Single global n-gram
cache built sequentially in 16K-token chunks. Every scored token sees the FULL 62M-token cache.
Verified: 1xGPU produces identical result (0.3001) — no multi-GPU artifacts.
Per-Order Adaptive Alpha (primary source of BPB gain)
Each n-gram order gets its own entropy center and weight multiplier:
Per-order entropy centers (high orders trusted at lower entropy):
Per-order weights (high orders boosted, low orders suppressed):
Base alpha: 0.20 + 0.55 * sigmoid(2 * (H - center)) per order.
Pre-Enrichment Confidence Modulation
Uses the pre-enrichment layer's transformation magnitude as a confidence signal. High delta = model uncertain =
trust n-gram more. Modulates alpha by (0.5 + 1.0 * pe_conf).
EMA on GPU (37% faster training)
EMA state kept on GPU during training. Step time: 64.7ms (vs 101ms before). 9,268 steps in 600s — 57% more
gradient updates.
GELU Pre-Enrichment (512→768→512)
Wider nonlinear transformation before the residual stream: embedding → BigramHash add → SmearGate →
Linear(512→768) → GELU → Linear(768→512) → RMS Norm → transformer blocks
XSA (Exclusive Self Attention) on Last 4 Layers
Removes self-value bias via orthogonal projection (arXiv:2603.09078, GQA-aware PR #265 @unnir). Zero
parameters.
Additional Techniques
Architecture: 10L, 512d, 8H/4KV GQA, MLP 3x, tied embeddings, U-Net skip connections. Training: Muon+AdamW,
WD=0.04, matrix_lr=0.025, warmdown=3500, batch=524K, seq=2048.
What Didn't Work
Compliance
Reproduction
All defaults baked in. No env vars needed (SEED=1337 default).
8xH100 SXM, 600s training + ~204s eval. For other seeds: SEED=42, SEED=3011.
Key Metrics
Credits
entropy-adaptive PR Record: First Legal Sub-1.0 BPB — Multi-order N-gram Backoff + Entropy-Adaptive Alpha (val_bpb=0.9674, 3-seed) #727 (@Asukabot0)
(@AayushBaniya2006)
Update Log